package org;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

/**
 *
 */
public class TankGame extends StateBasedGame {
	
	/**
	 * Create a new test of graphics context rendering
	 */
	public TankGame() {
		super("Tank Three");
	}
	
	
	public void initStatesList(GameContainer container) throws SlickException {
		addState(new GameState());
	}
	
	/**
	 * @see org.newdawn.slick.BasicGame#keyPressed(int, char)
	 */
	public void keyPressed(int key, char c) {
		super.keyPressed(key, c);
		
		if (key == Input.KEY_ESCAPE) {
			System.exit(0);
		}
	}
	
	/**
	 * Entry point to our test
	 * 
	 * @param argv The arguments passed to the test
	 */
	public static void main(String[] argv) {
		try {
			AppGameContainer container = new AppGameContainer(new TankGame());
			container.setDisplayMode(800,640,false);
			container.start();
		} catch (SlickException e) {
			e.printStackTrace();
		}
	}
}
